package com.jsj.service;

import com.jsj.dao.LabelDao;
import com.jsj.domain.Label;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LabelService {
    private LabelDao labelDao;

    @Autowired
    public void setLabelDao(LabelDao labelDao) {
        this.labelDao = labelDao;
    }

    public Integer insert(Label label) {
        return labelDao.insert(label);
    }

    public Integer delete(int id) {
        return labelDao.delete(id);
    }

    public Integer update(Label label) {
        return labelDao.update(label);
    }

    public List<Label> queryByTeacher(String creator) {
        return labelDao.queryByTeacher(creator);
    }

    public Label queryById(int labelId) {
        return labelDao.queryById(labelId);
    }
}
